-
Notifications
You must be signed in to change notification settings - Fork 12.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[DO NOT MERGE] Document non-exported macros with --document-private-items
#79396
Conversation
(rust-highfive has picked a reviewer for you, use r? to override) |
--document-private-items
--document-private-items
The approach I took is to track non-exported macros in This will also probably need a perf run since it's tracking additional information in the HIR, which has the potential slow the compiler down somewhat. |
For reference, this is the error that I get when I use rustdoc with this line commented-out: rust/compiler/rustc_hir/src/intravisit.rs Line 466 in de0530d
Errors:
This is the file I'm trying to document: // compile-flags: --document-private-items
fn foo_fn() {}
pub fn pub_foo_fn() {}
macro_rules! foo_macro {
() => { };
}
#[macro_export]
macro_rules! exported_foo_macro {
() => { };
}
// TODO: add `@has` checks |
I'll copypaste my answer to @danielhenrymantilla , who was going to implement similar things.
|
☔ The latest upstream changes (presumably #79455) made this pull request unmergeable. Please resolve the merge conflicts. Note that reviewers usually do not review pull requests until merge conflicts are resolved! Once you resolve the conflicts, you should change the labels applied by bors to indicate that your PR is ready for review. Post this as a comment to change the labels:
|
@camelid @petrochenkov It sounds like the current approach both doesn't work and adds technical debt that would have to be fixed later, so I'm going to close this. I'll copy @petrochenkov's advice for the proper way to do this to the issue. |
Fixes #73754.
This is in no way ready to be merged since it doesn't work yet. I would
appreciate some advice if you have time!